package com.bdqn.rpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;

public class JalonNameNodeServer implements RPCProtocol {
    public static void main(String[] args) throws IOException {
        RPC.Server server = new RPC.Builder(new Configuration())
                .setBindAddress("127.0.0.1")
                .setPort(20000)
                .setProtocol(RPCProtocol.class)
                .setInstance(new JalonNameNodeServer())

                .build();
        System.out.println("服务器启动成功");
        server.start();

    }

    @Override
    public void mkdirs(String path) {
        System.out.println("创建文件夹：" + path);
    }
}
